FROM golang:alpine3.13
WORKDIR /root/dhuviewer/db
ADD . /root/dhuviewer/db
ENV GO111MODULE=on
ENV GOPROXY=https://goproxy.cn
RUN go env -w GO111MODULE=on
RUN go env -w GOPROXY=https://goproxy.cn,direct
RUN go mod download
RUN go build -o dhuviewer
EXPOSE 8080
ENTRYPOINT ["./dhuviewer"]